{{! -------------------------------------------------------------------------- }}
{{! Copyright 2002-2016, OpenNebula Project, OpenNebula Systems                }}
{{!                                                                            }}
{{! Licensed under the Apache License, Version 2.0 (the "License"); you may    }}
{{! not use this file except in compliance with the License. You may obtain    }}
{{! a copy of the License at                                                   }}
{{!                                                                            }}
{{! http://www.apache.org/licenses/LICENSE-2.0                                 }}
{{!                                                                            }}
{{! Unless required by applicable law or agreed to in writing, software        }}
{{! distributed under the License is distributed on an "AS IS" BASIS,          }}
{{! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   }}
{{! See the License for the specific language governing permissions and        }}
{{! limitations under the License.                                             }}
{{! -------------------------------------------------------------------------- }}

{{#if searchDropdownHTML}}
<div id="{{dataTableSearchId}}-wrapper" class="input-group">
  <input class="input-group-field" id="{{dataTableSearchId}}" type="search" placeholder="{{tr "Search"}}" />
  <div class="input-group-button">
    <button type="button" class="button search-dropdown hollow secondary" data-toggle="{{dataTableSearchId}}-dropdown">
      <i class="fa fa-fw fa-caret-down"/>
    </button>
  </div>
  <div class="dropdown-pane left large" id="{{dataTableSearchId}}-dropdown" data-dropdown data-auto-focus="true">
    {{{searchDropdownHTML}}}
    <div class="row">
      <div class="small-12 columns">
        <label>{{tr "Label filter:"}} <span class="advanced-search-label"/></label>
        <br/>
      </div>
    </div>
    <div class="row">
      <div class="small-12 columns">
        <button type="button" class="button advanced-search">
          <i class="fa fa-fw fa-search"/>
        </button>
        <a class="advanced-search-clear right">{{tr "Clear search"}}</a>
      </div>
    </div>
    <button class="close-button" data-close aria-label="{{tr "Close"}}" type="button">
      <span aria-hidden="true">&times;</span>
    </button>
  </div>
</div>
{{else}}
<input id="{{dataTableSearchId}}" type="search" placeholder="{{tr "Search"}}" />
{{/if}}